package com.gugee.common.web.system.user.model;

import com.gugee.common.web.system.user.dto.UserReceiveDto;
import com.gugee.common.web.system.user.dto.UserRegister;
import com.xiguaji.boot.data.rdb.aggregate.Aggregate;
import lombok.Data;
import org.mapstruct.Mapper;
import org.springframework.data.relational.core.mapping.Table;

@Data
@Table
public class User extends Aggregate {
    private String firstName;
    private String lastName;
    private Long parentId;
    private Boolean activation;
    private String email;
    private String password;
    private String avatar;
    private int source;

    @Mapper(componentModel = "spring")
    public interface UserRegisterMapper {
        User mapper(UserRegister dto);

    }

    @Mapper(componentModel = "spring")
    public interface UserReceiveMapper {
        User mapper(UserReceiveDto dto);

    }

}
